1. Field of the Invention
The present invention relates to a digital TV system and, in particular, to a caption data processing apparatus for a digital TV for looking up a caption data contained in a digital broadcast signal.
2. Description of the Prior Art
Recently, the development of a digital TV that receives digital broadcasting and displays it to users by digital broadcasting implemented by a broadcasting station, is in progress. Since the digital TV has a wider screen, a higher resolution and a high-speed data transfer rate compared to a conventional analog TV, a wider variety of caption services are possible. These caption services are properly used for a hearing-impaired person, or efficiently used in teaching or studying a foreign language.
The EIA(Electronic Industries Alliance) proposes various standard formats with respect to the caption specification of a digital TV. For example, the formation of a caption bit stream, the definition of various control commands required for processing a caption data, the code matching of a caption text and a caption command, etc. are proposed, which are well represented in the EIA-708-A(November 1998).
Such a digital TV provides the user with a caption service of more various functions than that provided on the conventional analog TV.
For instance, the digital TV has the caption transfer rate of 9600 bit/sec while the analog TV has the transfer rate of 960 bit/sec. This increase in transfer rate makes it possible to send caption data simultaneously using various languages.
Captions of the conventional analog TV are transmitted and then directly displayed on a screen by sending the caption data in real time by a caption provider.
However, the digital TV use the additional synchronization method in which caption data is processed some time later by the control of a caption decoder. That is, the transmitted caption data can be displayed on a screen after a certain time by the control of the caption decoder. In order to implement the above-described additional synchronization method, the digital TV includes a service input buffer 102 for storing caption data as shown in FIG. 1. That is, a caption data contained in a bit stream of the digital TV is parsed by a service number that the user wants, which parsed data contains various commands and texts with respect to captions. The digital TV caption decoder stores all parsed data to the service input buffer 102 in order to process these data.
The above additional synchronization method can be implemented by using three commands among various caption commands inputted to the service input buffer 102, that is, a Delay command, a DelayCancel command and a Reset command.
Herein, the Delay command is used in stopping data processing of the service input buffer 102 for a certain time. In addition, the DelayCancel command cancels the current state of stopping the processing of the service input buffer 102 for a certain time by the Delay command, and restarts data processing without delay. And, the Reset command newly initializes the caption service of the digital TV.
At this time, the DelayCancel and Reset commands of the three commands must be looked up in advance before going into the service input buffer 102. That is, the above commands are ones to be implemented as soon as they are looked up, the reason of which is because the implementation of these commands is delayed as much as the capacity of the buffer when the commands go into the service input buffer 102. If the three commands are stored in the service input buffer 102, data that must not be delayed or a service to be reset is continuously delayed until the commands are detected.
In order to exclude the above-described case, the shear of the service input buffer 102 includes a Reset and DelayCancel command detecting unit 101 in the conventional art.
According to the conventional art, all caption data(e.g., a caption data stream containing a caption command, a caption text, and a control command) is inputted to the Reset and DelayCancel command detecting unit 101, and the Reset and DelayCancel command detecting unit 101 detects a DelayCancel command and a Reset command from all the caption data.
If a DelayCancel command or a Reset command are detected from a caption data stream, a Reset operation or a DelayCancel operation corresponding to the above commands is directly executed and the caption data stream except for the two commands is stored in the service input buffer 102 to thereafter be processed sequentially.
FIG. 2 is a view showing a detailed construction of the Reset and DelayCancel command detecting unit 101 as shown in FIG. 1. In addition, FIG. 2 shows a caption data detecting unit defined by the EIA-708-A. As shown in FIG. 2, the Reset and DelayCancel detecting unit 101 includes a transmission register and two 1 byte comparators 202 and 203. The two 1 byte comparators detect a Reset command and a DelayCancel command, respectively, and output them without passing through the service input buffer 102. That is, since the Reset command and the DelayCancel command are 1 byte in size, respectively, the two commands can be detected by presetting the value(0x8) corresponding to the DelayCancel command and the value(0x8F) corresponding to the Reset command and then comparing these values with an inputted caption data stream.
FIG. 3 is a view showing a caption code set mapping of a digital TV as defined by the EIA-708-A.
All commands and texts are constructed of 256 code maps of ANSI X3,41 and ISO 2022 as shown in Figure. At this time, some commands and texts can have a length of more than 1 byte, In addition, there are commands and texts of which length is not set but variable. In this manner, commands and texts inputted to the Rest and DelayCancel command detecting unit have a length of more than 1 byte or a variable length, so that the above commands or texts of a variable length may overlap with a DelayCancel command or a Reset command to be looked up if the DelayCancel command and the Reset command are looked up by a simple byte comparison as shown in FIG. 2. For example, the DelayCancel command defined by the EIA-708-A has a code value of 0x8E, and the size thereof is 1 byte. In addition, a DF5 command defining a fifth window has a code value of 0x9D as shown in FIG. 3, and the size thereof is 7 byte so as to represent various characteristics(e.g., the number of windows, the size of a window, and the position of a window) of the window.
In the case that the above-mentioned DF5 command is inputted to the Reset and DelayCancel command detecting unit 101, when a DelayCancel command or a Reset command is to be detected simply by using a byte comparison, an error of recognizing 0x8E as a DelayCancel command occurs if there is 0x8E in the content of 7 byte forming the DF5 command. This error can also be occurred in the case that a text with a length of more than 1 byte is inputted to the Reset and DelayCancel command detecting unit 101.
Accordingly, it is an object of the present invention to provide a caption data processing apparatus for a digital TV for accurately looking up a DelayCancel command and a Reset command without an error in a caption decoder of a digital TV using a lookup table.
It is another object of the present invention to provide a caption data processing apparatus for a digital TV for rapidly looking up a DelayCancel command and a Reset command using a lookup table.
The apparatus according to the present invention includes a command lookup table in which information on the additional byte length of more than 1 byte when a caption command has a length of more than 1 byte and information on whether the caption command inputted to a command detecting unit is a Reset command or a DelayCancel command are mapped; a command detecting unit for detecting whether the caption command inputted using the command lookup table is a DelayCancel command or a Reset command when the caption command is inputted; an extended code lookup table in which information on the additional byte length of other texts or control commands except for the above caption commands is mapped; an extended code detecting unit for discriminating whether or not the length of an inputted text or a control command exceeds one byte when the text or control command is inputted and further reading the caption data stream as much as the additional byte length if it exceeds one byte; and a service input buffer for storing the caption commands and texts outputted from the command detecting unit and the extended code detecting unit.